{% for field in form %}
    {% if field.is_hidden %}
        {{ field }}
    {% else %}
        {% include "wagtailadmin/shared/field_as_li.html" with field=field %}
    {% endif %}
{% endfor %}